# Humm and Strumm Video Game
# Copyright (C) 2008-2011, the people listed in the AUTHORS file. 
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# UploadDownloads.cmake -- Uploads files created by CPack to Google Code.

# TARGET: dist-upload
# Uploads files generated by CPack to the Google Code downloads section.

add_custom_target (dist-upload-source-tgz
                   COMMAND ${PERL_PROGRAM}
                     googlecode_upload.pl
                     -n "hummstrumm"
                     -s "\"Version ${HUMMSTRUMM_VERSION}, Source Code (GZIP format)\""
                     -l "\"Featured Type-Source OpSys-All\""
                     ${hummstrumm_BINARY_DIR}/${HUMMSTRUMM_NAME_RELEASE}.tar.gz
                   WORKING_DIRECTORY ${hummstrumm_SOURCE_DIR}/scripts)
add_custom_target (dist-upload-source-zip
                   COMMAND ${PERL_PROGRAM}
                     ${hummstrumm_SOURCE_DIR}/scripts/googlecode_upload.pl
                     -n "hummstrumm"
                     -s "\"Version ${HUMMSTRUMM_VERSION}, Source Code (ZIP format)\""
                     -l "\"Featured Type-Source OpSys-All\""
                     ${hummstrumm_BINARY_DIR}/${HUMMSTRUMM_NAME_RELEASE}.zip
                   WORKING_DIRECTORY ${hummstrumm_SOURCE_DIR}/scripts)

add_custom_target (dist-upload)
add_dependencies (dist-upload dist-upload-source-tgz dist-upload-source-zip)